<template>
  <!-- UserAgreement 用户协议及隐私协议 -->
  <view class="container">
    <!-- 用户协议及隐私协议 -->
    <Header :title="pageTitle" />
    <TRichText :content="getContent" />
  </view>
</template>

<script lang="ts" setup>
  /**  UserAgreement  用户协议及隐私协议 */
  import Header from '@/components/Header/index.vue';
  import TRichText from '@/components/TRichText/index.vue';
  import { onLoad } from '@/router';
  import { useAppStoreWithOut } from '@/store/modules/app';
  import { computed, ref } from 'vue';

  const type = ref<number>(1);
  const pageTitle = ref('用户协议及隐私协议')
  onLoad<'userAgreement'>((op) => {
    type.value = op.type;
  });

  const { globalConfig } = useAppStoreWithOut();
  const getContent = computed(() => globalConfig?.userAgreement)
</script>

<style lang="scss" scoped>
  .container {
    padding: 10rpx 40rpx;
    min-height: 100vh;
    background-color: #fff;
  }
</style>
